<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
  width:300px;
  height:300px;
  display: flex;
  background-color: DodgerBlue;
}

div:not(.flex-container){
  width: 30px;
  height: 20px;
}
.flex-container > div {
  background-color: #f1f1f1;
  margin: 10px;
  padding: 20px;
  font-size: 30px;
}
.flex-container{
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  align-content: center;
}
#id_1{
  order:3;
  flex-grow: 0;
}
#id_2{
  order:2;
  flex-shrink: 1;
  align-self:flex-start
}
#id_3{
  order:1;
  flex-basis:auto;
  align-self:auto
}
</style>
</head>
<body>

<div class="flex-container">
  <div id="id_1">1</div>
  <div id="id_2">2</div>
  <div id="id_3">3</div>  
</div>

<p>弹性布局中必须有一个 <em>display</em> 属性设置为 <em>flex</em> 的父元素。</p>

<p>弹性容器的直接子元素会自动成为弹性项目。</p>

</body>
</html>